IconIDToRgn
IconIDToRgn Create a region from an icon mask
#include <Icons.h> Finder Interface
OSErr IconIDToRgn (theRgn, iconRect, alignment, iconID );
RgnHandle theRgn ; receives region created from icon mask
Rect *iconRect ; rectangle indicating icon to choose
short alignment ; alignment for icon
Handle iconID ; resource id of icon family
returns Error Code; 0 = no error
IconIDToRgn selects an icon from the icon family with resource id iconID,
based on iconRect, and creates a region from the icon mask of that icon. The
icon mask is aligned according to the alignment parameter. The region created
is returned in theRgn. This allows you to do accurate hit testing and outline
dragging of the icon in your application. theRgn must be allocated before
calling IconIDToRgn. It is NOT necessary to explicitly create an
icon family (using NewIconSuite , GetIconSuite or MakeIconCache ) in
order to use this routine.

Notes: This routine is not currently documented in MPW header files (hence, it is
not in any THINK C or THINK Pascal header file either). The information
given above comes from Macintosh Technical Note #306. This tech. note
also gives the inline glue for the call as follows:
pascal OSErr IconIDToRgn (RgnHandle theRgn, const Rect *iconRect,
short alignment, short iconID)
= {0x303C, 0x0613, 0xABC9};